package com.gglx.flex.components
{
	import com.gglx.tweens.GGMax;

	import spark.components.BusyIndicator;

	public class GGBusyIndicator extends BusyIndicator
	{
		public function GGBusyIndicator()
		{
			super();
		}

		override public function set visible(value:Boolean):void
		{
			super.visible = value;

			if (value)
			{
				GGMax.delayedCall(13, hide);
			}

			if (parent)
			{
				parent.mouseEnabled = !value;
				parent.mouseChildren = !value;
			}
		}

		private function hide():void
		{
			visible = false;
		}
	}
}
